<?php
include_once('./../../config.php');

global $PAYPAL_EMAIL;
global $PAYPAL_CURRENCY;
global $CLAN_NAME;
$client_ip = $_SERVER['REMOTE_ADDR'];  

?>
<h2 style="display:none;">Donation Submission Form</h2>
<form class="LeftContent" name="PayPal" action="https://www.paypal.com/us/cgi-bin/webscr" method="post" accept-charset='UTF-8'>
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="amount" value="5.00">
    <input type="hidden" name="business" value="<?=$PAYPAL_EMAIL ?>">
    <input type="hidden" name="currency_code" value="<?=$PAYPAL_CURRENCY ?>">
    <input type="hidden" name="item_name" value="Donation - <?=$CLAN_NAME ?>">
    <input type="hidden" name="notify_url" value="http://rac.site.nfoservers.com/addsteam.php">
    <input type="hidden" name="return" value="http://rac.site.nfoservers.com/index.php?paypal=success">
    <input type="hidden" name="cancel_return" value="http://rac.site.nfoservers.com/index.php?paypal=fail">
    <input type="hidden" name="rm" value="1">
    <input type="hidden" name="on0" value="<?=$client_ip ?>" />  
    
    <label id="steamidLabel" for="playerName">Player Name:</label>
    <input class="GreyBackGround" id="playerName" size="25" name="on1" value="" readonly="readonly" />
    <label id="steamidLabel" for="ppSteamid">Steam ID:</label>
    <input class="GreyBackGround" id="ppSteamid" size="25" name="item_number" value="" readonly="readonly" />
    
    <fieldset id="disclaimer">
        <legend>Disclaimer</legend>
        <textarea class="disclaimerBox" readonly="readonly"><?php include('disclaimer.txt'); ?></textarea>
        <input class="checkbox" id="disclaimer_agree" type="checkbox" name="disclaimer_agree" value="yes" />
        <label id="checkboxLabel" for="disclaimer_agree">I agree to these conditions.</label>
    </fieldset>
    
    <div id="PPerrorMessage" class="errorMessage"></div>
        
    <div id="ppButtons">
        <input class="button ClearFloats PPButton" type="button" name="resetButton" value="Start Over" onclick="window.location.reload();">     
        <input class="button ClearFloats PPButton" type="button" name="submitButton" value="Make Donatation"  onclick="return validatePayPal();">
    </div>            
</form> 